package lendingbooks.activities;
import android.app.Application;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.widget.TabHost;


public class LendingBooksApplication extends Application {
	
	private String fbAccessToken;
	private String fbUserName;
	private String fbUserId;
	private TabHost tabHost = null;
	private boolean myLibraryChanged = false;
	private boolean onLine = false;
	
	
	public boolean isOnline() {
	    ConnectivityManager cm =
	        (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
	    NetworkInfo netInfo = cm.getActiveNetworkInfo();
	    if (netInfo != null && netInfo.isConnectedOrConnecting()) {
	        return true;
	    }
	    return false;
	}
	
	public boolean isMyLibraryChanged() {
		return myLibraryChanged;
	}
	public void setMyLibraryChanged(boolean myLibraryChanged) {
		this.myLibraryChanged = myLibraryChanged;
	}
	public String getFbAccessToken() {
		return fbAccessToken;
	}
	public void setFbAccessToken(String fbAccessToken) {
		this.fbAccessToken = fbAccessToken;
	}
	public String getFbUserName() {
		return fbUserName;
	}
	public void setFbUserName(String fbUserName) {
		this.fbUserName = fbUserName;
	}
	public String getFbUserId() {
		return fbUserId;
	}
	public void setFbUserId(String fbUserId) {
		this.fbUserId = fbUserId;
	}
	public TabHost getTabHost() {
		return tabHost;
	}
	public void setTabHost(TabHost tabHost) {
		this.tabHost = tabHost;
	}

	public boolean isOnLine() {
		return onLine;
	}

	public void setOnLine(boolean onLine) {
		this.onLine = onLine;
	}
	

}
